#include <iostream>
// using namespace std;

typedef unsigned long long ULL;
using u64 = unsigned long long;

const int N = 100005;
const int P = 13331; // 一般是 13331，取模的数时 2 ** 64 -1， ULL溢出，自动取模


int n, m;
char str[N];
ULL h[N], p[N];     // h 是哈希值， p 是 131 的次方数


ULL get(int l, int r) {
    return h[r] - h[l - 1] * p[r - l + 1];
}
u64 hash(std::string s) {
    ULL re = 0;
    for (int i = 0; i < n; ++i) {
        re = re * P + s[i];
    }
    return re;
}

int main() {
    std::scanf("%d%d%s", &n, &m, str + 1);
    p[0] = 1;
    for (int i = 1; i <= n; ++i) {
        p[i] = p[i - 1] * P;
        h[i] = h[i - 1] * P + str[i];
    }

    while (m--) {
        int l1, r1, l2, r2;
        std::scanf("%d%d%d%d", &l1, &r1, &l2, &r2);
        if(get(l1, r1) == get(l2, r2)) std::puts("Yes");
        else std::puts("No");
    }

    return 0;
}